package org.darcy.dao;

import org.apache.ibatis.annotations.Param;
import org.darcy.entity.BizComment;
import org.darcy.framework.generic.GenericDao;
import org.darcy.model.BizCommentModel;
import org.springframework.stereotype.Repository;

import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 * 文章评论
 */
@Repository
public interface BizCommentMapper extends GenericDao<BizComment> {

	/**
	 * 综合查询
	 */
	IPage<BizCommentModel> query(IPage<BizCommentModel> page, @Param(value = "p") BizCommentModel param);

	/**
	 * 点赞
	 *
	 * @param id
	 */
	void doSupport(Long id);

	/**
	 * 点踩
	 *
	 * @param id
	 */
	void doOppose(Long id);

	/**
	 * 获取单个评论，关联查询文章信息
	 *
	 * @param id
	 */
	BizComment getById(Long id);
}
